#include "hzpch.h"
#include "FrameBuffer.h"

#include "Hazel/Renderer/Renderer.h"
#include "Platform/OpenGL/OpenGLFrameBuffer.h"

namespace Hazel
{

    Ref<FrameBuffer> FrameBuffer::Create(const FramebufferSpecification& spec)
    {
		switch (Renderer::GetAPI())
		{
		case RendererAPI::API::None:		HZ_CORE_ASSERT(false, "RendererAPI::None is currently not supported!");
		case RendererAPI::API::OpenGL:		return CreateRef<OpenGLFrameBuffer>(spec);

		default:
			break;
		}
		HZ_CORE_ASSERT(false, "Unkown RendererAPI!");
		return nullptr;
    }
}